package com.medata.repository;

import com.medata.dataObject.HotWords;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author ：zb
 * @date ：Created in 2019/7/23 0023 10:15
 * @description：
 */

public interface HotWordsRepository extends JpaRepository<HotWords,String> {
    @Query(value = "select top 10 * from HotWords ORDER BY hitCount desc ",nativeQuery = true)
    List<HotWords> topHotFind();

    HotWords findByHotWord(String hotWord);


}
